<?php
/**
 * 港口相关表
 * @author Administrator
 *
 */
class Application_Model_DbTable_Port extends Application_Model_DbTable_Base
{
    protected $_name = 'port';
	
	/**
	 * 取得港口列表
	 */
	public function getPortListForFlex($pageM = NULL){
		$rows = $this->jqfetchAll($pageM);
		return $rows;
	}

	/**
	 * 港口id-英文名
	 * @return array
	 */
	public function getKvIdNameEn(){
		$rows = $this->fetchAll();
		$data = array();
		foreach ($rows as $r){
			$data[$r->id] = $r->name_en;
		}
		return $data;
	}
	
	/**
	 * 港口id-中文名
	 * @return array
	 */	
	public function getKvIdNameCn(){
		$rows = $this->fetchAll();
		$data = array();
		foreach ($rows as $r){
			$data[$r->id] = $r->name_cn;
		}
		return $data;
	}
}

